/**
 * 本地存储当前用户
 * @param {用户id} userId 
 */
export const setUserInfoLocalStorage = (userId) => {
    localStorage.setItem('ButVanUserId', userId)
}

/**
 * 本地存储用户信息
 * @param {*} username 
 * @param {*} userEmial 
 */
export const setUserNameWithUserEmail = (userInfo) => {
    const obj = JSON.stringify(userInfo)
    localStorage.setItem('ButVanUserInfo', obj)
}

/**
 * 读取本地存储中的用户信息
 */
export const getLocalToUserInfo = () => {
    const userInfo = localStorage.getItem("ButVanUserInfo");
    const obj = JSON.parse(userInfo);
    return obj
}